#pragma once
#include "DXAMLCommon.h"

#include "XamlSchemaContext.h"
#include "CDependencyProperty.h"
#include "XamlServiceProviderContext.h"
#include "IPALUri.h"
#include "XamlCommonServiceProviderContext.h"



class XamlRuntime
{
public: 
	virtual ~XamlRuntime();
	virtual HRESULT CreateInstance(const struct XamlTypeToken & inXamlType, xshared_ptr<XamlQualifiedObject> & qo) = 0;
	virtual HRESULT CreateFromValue(class xshared_ptr<XamlServiceProviderContext> inServiceContext, const struct XamlTypeToken & inTextSyntaxToken, const xshared_ptr<XamlQualifiedObject> & qoValue, const struct XamlPropertyToken & inProperty, const struct XamlTypeToken & inType, const xshared_ptr<XamlQualifiedObject> & qoRootInstance, xshared_ptr<XamlQualifiedObject> & qo) = 0;
	virtual HRESULT CreateFromXmlText(const struct XamlTypeToken & inXamlType, const xshared_ptr<CXString> & inText, xshared_ptr<XamlQualifiedObject> & qo) = 0;
	virtual HRESULT GetValue(const xshared_ptr<XamlQualifiedObject> & qoObj, const struct XamlPropertyToken & inProperty, xshared_ptr<XamlQualifiedObject> & outValue) = 0;
	virtual HRESULT SetValue(const struct XamlTypeToken & inType, const xshared_ptr<XamlQualifiedObject> & inObj, const struct XamlPropertyToken & inProperty, const xshared_ptr<XamlQualifiedObject> & inValue, XBOOL bAllowEvents, XBOOL bBindTemplates) = 0;
	virtual HRESULT Add(const xshared_ptr<XamlQualifiedObject> & qoCollection, const struct XamlPropertyToken & inCollectionProperty, const xshared_ptr<XamlQualifiedObject> & inValue, const struct XamlTypeToken & valueXamlType) = 0;
	virtual HRESULT AddToDictionary(const xshared_ptr<XamlQualifiedObject> & collection, const struct XamlPropertyToken & property, const xshared_ptr<XamlQualifiedObject> & value, const xshared_ptr<XamlQualifiedObject> & key) = 0;
	virtual HRESULT CallProvideValue(const xshared_ptr<XamlQualifiedObject> & qoMarkupExtension, const xshared_ptr<XamlCommonServiceProviderContext> & spServiceProviderContext, xshared_ptr<XamlQualifiedObject> & qo) = 0;
	virtual HRESULT InitializationGuard(const xshared_ptr<XamlType> & spXamlType, const xshared_ptr<XamlQualifiedObject> & qoInstance, XBOOL fInitializing) = 0;
	virtual HRESULT SetUriBase(const xshared_ptr<XamlType> & spXamlType, const xshared_ptr<XamlQualifiedObject> & qoInstance, class xref_ptr<IPALUri> spBaseUri) = 0;
	virtual HRESULT SetConnectionId(const xshared_ptr<XamlQualifiedObject> & qoComponentConnector, const xshared_ptr<XamlQualifiedObject> & qoConnectionId, const xshared_ptr<XamlQualifiedObject> & qoTarget) = 0;
};

